Easy way to understand Python pattern programs